package leetcode.array;


public interface SolutionService {

	/**
	 * 1.Two Sum
	 * @param nums
	 * @param target
	 * @return
	 */
	int[] twoSum(int[] nums, int target);

	/**
	 * 26.Remove Duplicates from Sorted Array
	 * @param nums
	 * @return
	 */
	int removeDuplicates(int[] nums);

	/**
	 * 27.Remove Element
	 * @param nums
	 * @param val
	 * @return
	 */
	int removeElement(int[] nums, int val);

	/**
	 * 35.Search Insert Position
	 * @param nums
	 * @param target
	 * @return
	 */
	int searchInsert(int[] nums, int target);

	/**
	 * 53.Maximum Subarray
	 * @param nums
	 * @return
	 */
	int maxSubArray(int[] nums);

	/**
	 * 66.Plus One
	 * @param digits
	 * @return
	 */
	int[] plusOne(int[] digits);

	/**
	 * 88.Merge Sorted Array
	 * @param nums1
	 * @param m
	 * @param nums2
	 * @param n
	 */
	void merge(int[] nums1, int m, int[] nums2, int n);

	/**
	 * 121.Best Time to Buy and Sell Stock
	 * http://blog.csdn.net/ljiabin/article/details/44900389
	 * @param prices
	 * @return
	 */
	int maxProfitI(int[] prices);

	/**
	 * 122.Best Time to Buy and Sell Stock II
	 * @param prices
	 * @return
	 */
	int maxProfitII(int[] prices);

	/**
	 * 136.Single Number
	 * @param nums
	 * @return
	 */
	int singleNumber(int[] nums);


	/**
	 * 349. Intersection of Two Arrays
	 * https://leetcode.com/problems/intersection-of-two-arrays/
	 * @param nums1
	 * @param nums2
	 * @return
	 */
	int[] intersection(int[] nums1, int[] nums2);

	/**
	 * 496. Next Greater Element I
	 * https://leetcode.com/problems/next-greater-element-i/
	 * @param nums1
	 * @param nums2
	 * @return
	 */
	int[] nextGreaterElement(int[] nums1, int[] nums2);

	/**
	 * 503. Next Greater Element II
	 * https://leetcode.com/problems/next-greater-element-ii/
	 * @param nums
	 * @return
	 */
	int[] nextGreaterElements(int[] nums);
	
}
